var baseJs = {
    _getQueryString: function (e) {
        var n = new RegExp("(^|&)" + e + "=([^&]*)(&|$)", "i"), i = window.location.search.substr(1).match(n);
        return null != i ? unescape(i[2]) : null
    }, _getDeviceInfo: function () {
        var e = {
            versions: function () {
                var e = navigator.userAgent;
                navigator.appVersion;
                return {
                    trident: e.indexOf("Trident") > -1,
                    presto: e.indexOf("Presto") > -1,
                    webKit: e.indexOf("AppleWebKit") > -1,
                    gecko: e.indexOf("Gecko") > -1 && -1 == e.indexOf("KHTML"),
                    mobile: !!e.match(/AppleWebKit.*Mobile.*/),
                    ios: !!e.match(/\(i[^;]+;( U;)? CPU.+Mac OS X/),
                    android: e.indexOf("Android") > -1 || e.indexOf("Linux") > -1,
                    iPhone: e.indexOf("iPhone") > -1,
                    iPad: e.indexOf("iPad") > -1,
                    Safari: e.indexOf("Safari") > 0,
                    QQ: !!e.match(/(?:MQQBrowser|QQ)/),
                    UC: !!e.match(/(?:UCWEB|UCBrowser)/)
                }
            }(), language: (navigator.browserLanguage || navigator.language).toLowerCase()
        };
        return e.versions.ios | e.versions.iPhone | e.versions.iPad ? 2 : e.versions.android ? 1 : 3
    }, _ajax: function (e, n, i, o, r) {
        return $.ajax({
            url: e, data: n || {}, type: i || "POST", async: o || !0, success: r, error: function (e) {
                console.log("网络异常，请稍后重试！")
            }
        })
    }, _setRem: function () {
        var e = document.documentElement, n = "orientationchange" in window ? "orientationchange" : "resize", i = function () {
            var n = e.clientWidth;
            n && (e.style.fontSize = n / 375 * 20 + "px", window.remscale = n / 375)
        };
        document.addEventListener && (window.addEventListener(n, i, !1), document.addEventListener("DOMContentLoaded", i, !1))
    }, isWeiXin: function () {
        return "micromessenger" == window.navigator.userAgent.toLowerCase().match(/MicroMessenger/i) ? 1 : 0
    }
};